import {ScrollView} from 'react-native-gesture-handler';
import {StyleSheet, Text, View, Image, ImageBackground, Alert} from 'react-native';
import React, {Component} from 'react';
import {Flex, WhiteSpace, Button, List, Toast, InputItem, Modal, PickerView, Radio} from '@ant-design/react-native';
import Item from '@ant-design/react-native/lib/list/ListItem';
import store from '~/store';
import {getOrderInfoByItemID, createTakeOrder, getParkingPackageInfo, getOrderExpressLog, getOrderInfo} from '~/api/order';
import {GetUserAddressInfo} from '~/api/owner';
import {getHttpUrl} from '~/api/basic';
import {setParkingOrderDepositState} from '~/api/parking';
const RadioItem = Radio.RadioItem;
export default class PackageOrder extends Component {
    static navigationOptions = ({navigation}) => {
        return {
            title: '赠品提货',
        };
    };
    constructor(props) {
        super(props);
        const getters = store.getState();
        this.state = {
            itemId: this.props.navigation.getParam('itemId'),
            ownerGiftID: this.props.navigation.getParam('ownerGiftID'),
            parkingOrderId: this.props.navigation.getParam('parkingOrderId'),
            orderId: this.props.navigation.getParam('orderId'), //
            giftType: this.props.navigation.getParam('giftType'), //1引流礼品  2车位礼品
            giftstate: this.props.navigation.getParam('giftstate') || 0, //0未领取  1已领取
            takeOrderDataId: this.props.navigation.getParam('takeOrderDataId') || 0, //已领取赠品订单id
            list: [],
            orderlist: [], //礼品列表
            orderinfo: '', //车位赠品订单详情
            number: '', //商品数量
            productName: '',
            priceMarketTotal: '',
            name: '',
            Phone: '',
            cityname: '',
            Address: '',
            bindOrderInfo: '',
            orderitem: null,
            imageurl: '',
            baseurl: '',
        };
        this.getlist();
        getHttpUrl().then((r) => {
            if (r.code === 0) {
                this.setState({
                    baseurl: r.data,
                });
            }
        });
    }
    getlist() {
        if (this.state.giftType === 1) {
            //引流礼品
            this.getGiftInfo();
        } else {
            //车位赠品
            this.getpackageInfo();
        }
    }
    getGiftInfo = () => {
        getOrderInfoByItemID({
            item_id: this.state.itemId,
        }).then((r) => {
            if (r.code === 0) {
                this.setState({
                    cityname: r.data.order_info.ReceiveCityName,
                    Address: r.data.order_info.ReceiveAddress,
                    productName: r.data.item_list[0].ProductName,
                    priceMarketTotal: r.data.item_list[0].PriceMarket,
                    imageurl: r.data.item_list[0].ProductImage,
                    number: r.data.item_list.length,
                });
            } else {
                console.log(r.msg);
            }
        });
    };
    getpackageInfo = () => {
        getOrderInfo({
            order_id: this.state.orderId,
        }).then((r) => {
            if (r.code === 0) {
                let itemlist = [];
                itemlist = r.data.item_list;
                itemlist.forEach((item, index) => {
                    if (item.Stock === 0) {
                        item.select = false;
                        item.radioid = true;
                    } else {
                        item.select = true;
                        item.radioid = false;
                    }
                });
                this.setState({
                    list: itemlist,
                    orderinfo: r.data.order_info,
                    cityname: r.data.order_info.ReceiveCityName,
                    Address: r.data.order_info.ReceiveAddress,
                    number: r.data.item_list.length,
                });
            } else {
                Alert.alert(r.msg);
            }
        });
    };
    onpress = () => {
        if (this.state.name === '') {
            Toast.info('请输入收货人姓名', 1);
        } else if (this.state.Phone === '') {
            Toast.info('请输入电话号码', 1);
        } else if (!/^1[3-9]\d{9}$/.test(this.state.Phone)) {
            Toast.info('请输入正确电话号码', 1);
        } else if (this.state.Address === '') {
            Toast.info('请输入详细地址', 1);
        } else {
            Modal.alert('提示', '确认领取该礼品？', [
                {
                    text: '取消',
                },
                {
                    text: '通过',
                    onPress: () => {
                        if (this.state.giftType === 1) {
                            createTakeOrder({
                                owner_gift_id: this.state.ownerGiftID,
                                receive_info: {
                                    name: this.state.name,
                                    mobile: this.state.Phone,
                                    address: this.state.Address,
                                    note: this.state.bindOrderInfo,
                                },
                            }).then((r) => {
                                if (r.code === 0) {
                                    this.props.navigation.replace('PackageOrderInfo', {
                                        takeOrderDataId: r.data.id,
                                        giftType: this.state.giftType, //1引流礼品  2车位礼品
                                    });
                                } else {
                                    Toast.info(r.msg);
                                }
                            });
                        } else {
                            let orderit = [];
                            this.state.list.forEach((item) => {
                                if (item.select === true) {
                                    orderit.push(item.OrderItemID);
                                }
                            });
                            createTakeOrder({
                                parking_order_id: this.state.parkingOrderId,
                                item_list: orderit,
                                receive_info: {
                                    name: this.state.name,
                                    mobile: this.state.Phone,
                                    address: this.state.Address,
                                    note: this.state.bindOrderInfo,
                                },
                            }).then((r) => {
                                if (r.code === 0) {
                                    this.props.navigation.replace('PackageOrderInfo', {
                                        takeOrderDataId: r.data.id,
                                        giftType: this.state.giftType, //1引流礼品  2车位礼品
                                    });
                                } else {
                                    Toast.info(r.msg);
                                }
                            });
                        }
                    },
                },
            ]);
        }
    };
    render() {
        const setName = (name) => {
            this.setState({
                name: name,
            });
        };
        const setPhone = (Phone) => {
            this.setState({
                Phone: Phone,
            });
        };
        const setAddress = (Address) => {
            this.setState({
                Address: Address,
            });
        };
        const setbindOrderInfo = (bindOrderInfo) => {
            this.setState({
                bindOrderInfo: bindOrderInfo,
            });
        };
        return (
            <View style={{width: '100%', height: '100%', paddingTop: 10}}>
                <ScrollView>
                    <View style={{width: '94%', marginLeft: '3%', marginRight: '3%', height: '90%', paddingBottom: 10}}>
                        {this.state.giftstate === 0 ? (
                            <Flex style={{width: '100%', backgroundColor: 'white', borderRadius: 10}}>
                                <View style={{width: '100%', paddingLeft: 20}} justify={'start'}>
                                    <Flex>
                                        <Text style={{fontSize: 14, fontWeight: 'bold', color: '#393B46', width: '20%'}}>收货人：</Text>
                                        <List style={{width: '65%'}}>
                                            <InputItem placeholder="请输入收货人姓名" type={'text'} onChange={setName} value={this.state.name} />
                                        </List>
                                    </Flex>
                                    <Flex>
                                        <Text style={{fontSize: 14, fontWeight: 'bold', color: '#393B46', width: '20%'}}>联系电话：</Text>
                                        <List style={{width: '65%'}}>
                                            <InputItem
                                                placeholder="请输入手机号码"
                                                type={'number'}
                                                maxLength={11}
                                                onChange={setPhone}
                                                value={this.state.Phone}
                                            />
                                        </List>
                                    </Flex>
                                    <Flex>
                                        <Text style={{fontSize: 14, fontWeight: 'bold', color: '#393B46', width: '20%'}}>区域：</Text>
                                        <List style={{width: '65%'}}>
                                            <InputItem disabled={true} type={'number'} value={this.state.cityname} />
                                        </List>
                                    </Flex>
                                    <Flex>
                                        <Text style={{fontSize: 14, fontWeight: 'bold', color: '#393B46', width: '20%'}}>收货地址：</Text>
                                        <List style={{width: '65%'}}>
                                            <InputItem
                                                placeholder="街道、小区、写字楼"
                                                type={'text'}
                                                onChange={setAddress}
                                                value={this.state.Address}
                                            />
                                        </List>
                                    </Flex>
                                    <Flex>
                                        <Text style={{fontSize: 14, fontWeight: 'bold', color: '#393B46', width: '20%'}}>备注：</Text>
                                        <List style={{width: '65%'}}>
                                            <InputItem
                                                placeholder="请输入备注"
                                                type={'text'}
                                                onChange={setbindOrderInfo}
                                                value={this.state.bindOrderInfo}
                                            />
                                        </List>
                                    </Flex>
                                </View>
                            </Flex>
                        ) : (
                            <Flex
                                style={{
                                    width: '100%',
                                    marginTop: 10,
                                }}>
                                <Image
                                    style={{
                                        width: '100%',
                                        aspectRatio: 1 / 0.35,
                                    }}
                                    source={require('~/assets/public/giftimage.png')}
                                />
                            </Flex>
                        )}

                        {this.state.giftType === 1 ? (
                            <View
                                style={{
                                    width: '100%',
                                    backgroundColor: 'white',
                                    marginTop: 10,
                                    paddingLeft: 10,
                                    paddingRight: 10,
                                    paddingBottom: 10,
                                    borderRadius: 10,
                                }}>
                                <Flex style={{width: '100%', marginTop: 10}}>
                                    <Flex style={{width: '25%'}}>
                                        <Image style={{width: '100%', aspectRatio: 1 / 1}} source={{uri: this.state.baseurl + this.state.imageurl}} />
                                    </Flex>
                                    <Flex direction={'column'} style={{width: '75%', aspectRatio: 3 / 1, paddingLeft: 10}}>
                                        <Flex style={{width: '100%', height: '60%'}} justify={'start'} align={'start'}>
                                            <Text
                                                numberOfLines={2}
                                                style={{
                                                    paddingTop: 5,
                                                    fontSize: 13,
                                                    fontWeight: '500',
                                                    color: '#393B46',
                                                }}>
                                                {this.state.productName}
                                            </Text>
                                        </Flex>
                                        <Flex style={{width: '100%', height: '40%', paddingBottom: 5}} align={'end'} justify={'between'}>
                                            <Flex>
                                                <Text style={{color: '#FF0600', fontSize: 13, fontWeight: 'bold'}}>
                                                    ￥{this.state.priceMarketTotal}
                                                </Text>
                                                <Text
                                                    style={{
                                                        paddingLeft: 10,
                                                        color: '#BBBBBB',
                                                        fontSize: 10,
                                                        fontWeight: '500',
                                                    }}>
                                                    共1件
                                                </Text>
                                            </Flex>
                                        </Flex>
                                    </Flex>
                                </Flex>
                            </View>
                        ) : (
                            this.state.list.map((item, index) => {
                                return (
                                    <View style={{backgroundColor: 'white', marginTop: 10, borderRadius: 5}}>
                                        {item.ProductTag === 11 ? (
                                            <View
                                                style={{
                                                    height: 95,
                                                    padding: 10,
                                                    borderRadius: 5,
                                                    width: '100%',
                                                }}>
                                                <Flex style={{width: '100%'}}>
                                                    <Flex
                                                        style={{width: '100%', borderRightWidth: 1}}
                                                        onPress={() => {
                                                            this.props.navigation.push('GiftInfo', {
                                                                params: item.ProductDataID,
                                                            });
                                                        }}>
                                                        <Image
                                                            style={{
                                                                width: '20%',
                                                                aspectRatio: 1 / 1,
                                                                padding: 10,
                                                                resizeMode: 'contain',
                                                            }}
                                                            source={{
                                                                uri: this.state.baseurl + item.ProductImage,
                                                            }}
                                                        />
                                                        <Flex direction="column" align="start" style={{padding: '3%', width: '60%'}}>
                                                            <Text numberOfLines={1} style={{fontSize: 20}}>
                                                                {item.ProductName}
                                                            </Text>
                                                            <Text
                                                                style={{
                                                                    paddingRight: 50,
                                                                    fontSize: 20,
                                                                    color: '#EC4F46',
                                                                }}>
                                                                {item.PriceMarket}元
                                                            </Text>
                                                        </Flex>
                                                    </Flex>
                                                </Flex>
                                            </View>
                                        ) : (
                                            <View
                                                style={{
                                                    padding: 10,
                                                    borderRadius: 5,
                                                    width: '100%',
                                                }}>
                                                <Flex style={{width: '100%'}}>
                                                    <Flex
                                                        style={{width: '100%'}}
                                                        onPress={() => {
                                                            this.props.navigation.push('GiftInfo', {
                                                                params: item.ProductDataID,
                                                            });
                                                        }}>
                                                        <Image
                                                            style={{
                                                                width: '20%',
                                                                aspectRatio: 1 / 1,
                                                                padding: 10,
                                                            }}
                                                            source={{
                                                                uri: this.state.baseurl + item.ProductImage,
                                                            }}
                                                        />
                                                        <Flex direction="column" align="start" style={{padding: 10, width: '80%'}}>
                                                            <Text numberOfLines={2} style={{fontsize: 12}}>
                                                                {item.ProductName}
                                                            </Text>
                                                            <Flex style={{paddingTop: 8}}>
                                                                <Text
                                                                    style={{
                                                                        paddingRight: 50,
                                                                        fontSize: 12,
                                                                        color: '#EC4F46',
                                                                    }}>
                                                                    ￥{item.PriceMarket}
                                                                </Text>
                                                                {item.Stock === 0 && <Text>商品缺货</Text>}
                                                            </Flex>
                                                        </Flex>
                                                        {/*{this.state.giftstate === 0 && (*/}
                                                        {/*    <View style={{width: '20%'}}>*/}
                                                        {/*        <RadioItem*/}
                                                        {/*            checked={item.index === index}*/}
                                                        {/*            disabled={item.Stock === 0}*/}
                                                        {/*            onChange={(event) => {*/}
                                                        {/*                if (event.target.checked) {*/}
                                                        {/*                    let list = this.state.list;*/}
                                                        {/*                    list[index].select = !list[index].select;*/}
                                                        {/*                    list[index].radioid = list[index].select == true ? false : true;*/}
                                                        {/*                    this.setState({*/}
                                                        {/*                        list,*/}
                                                        {/*                    });*/}
                                                        {/*                }*/}
                                                        {/*            }}>*/}
                                                        {/*            {item.select === true ? (*/}
                                                        {/*                <Image*/}
                                                        {/*                    style={{width: 24, height: 24}}*/}
                                                        {/*                    source={require('~/assets/public/select2.png')}*/}
                                                        {/*                />*/}
                                                        {/*            ) : (*/}
                                                        {/*                <Image*/}
                                                        {/*                    style={{width: 24, height: 24}}*/}
                                                        {/*                    source={require('~/assets/public/noselect2.png')}*/}
                                                        {/*                />*/}
                                                        {/*            )}*/}
                                                        {/*        </RadioItem>*/}
                                                        {/*    </View>*/}
                                                        {/*)}*/}
                                                    </Flex>
                                                    {/*<Flex style={{width: '30%'}}>*/}
                                                    {/*    {this.state.giftstate === 0 && (*/}
                                                    {/*        <View style={{width: '30%'}}>*/}
                                                    {/*            <RadioItem*/}
                                                    {/*                checked={item.index === index}*/}
                                                    {/*                disabled={item.Stock === 0}*/}
                                                    {/*                onChange={(event) => {*/}
                                                    {/*                    if (event.target.checked) {*/}
                                                    {/*                        let list = this.state.list;*/}
                                                    {/*                        list[index].radioid = !list[index].radioid;*/}
                                                    {/*                        list[index].select = list[index].radioid == true ? false : true;*/}
                                                    {/*                        this.setState({*/}
                                                    {/*                            list,*/}
                                                    {/*                        });*/}
                                                    {/*                    }*/}
                                                    {/*                }}>*/}
                                                    {/*                {item.radioid === true ? (*/}
                                                    {/*                    <Image*/}
                                                    {/*                        style={{width: 24, height: 24}}*/}
                                                    {/*                        source={require('~/assets/public/select2.png')}*/}
                                                    {/*                    />*/}
                                                    {/*                ) : (*/}
                                                    {/*                    <Image*/}
                                                    {/*                        style={{width: 24, height: 24}}*/}
                                                    {/*                        source={require('~/assets/public/noselect2.png')}*/}
                                                    {/*                    />*/}
                                                    {/*                )}*/}
                                                    {/*            </RadioItem>*/}
                                                    {/*        </View>*/}
                                                    {/*    )}*/}
                                                    {/*    {this.state.giftstate === 0 ? (*/}
                                                    {/*        <Flex*/}
                                                    {/*            onPress={() => {*/}
                                                    {/*                this.props.navigation.push('GiftMoreList', {*/}
                                                    {/*                    productParamID: item.ProductParamID,*/}
                                                    {/*                });*/}
                                                    {/*            }}*/}
                                                    {/*            style={{width: '70%', height: '100%'}}>*/}
                                                    {/*            <Text style={{}}>私人定制</Text>*/}
                                                    {/*        </Flex>*/}
                                                    {/*    ) : (*/}
                                                    {/*        <Flex*/}
                                                    {/*            onPress={() => {*/}
                                                    {/*                item.OrderExpressID === 2*/}
                                                    {/*                    ? this.props.navigation.push('GiftMoreList', {*/}
                                                    {/*                          productParamID: item.ProductParamID,*/}
                                                    {/*                      })*/}
                                                    {/*                    : this.props.navigation.push('PackageOrderInfo', {*/}
                                                    {/*                          takeOrderDataId: this.state.takeOrderDataId,*/}
                                                    {/*                          giftType: this.state.giftType, //1引流礼品  2车位礼品*/}
                                                    {/*                      });*/}
                                                    {/*            }}*/}
                                                    {/*            style={{width: '70%', height: '100%'}}>*/}
                                                    {/*            <Text style={{}}>*/}
                                                    {/*                {item.OrderExpressID === 1 && '已兑换'}*/}
                                                    {/*                {item.OrderExpressID === 2 && '已换卡'}*/}
                                                    {/*            </Text>*/}
                                                    {/*        </Flex>*/}
                                                    {/*    )}*/}
                                                    {/*</Flex>*/}
                                                </Flex>
                                                <View style={{width: '100%', height: 1, borderWidth: 1, borderColor: '#f4f4f4'}} />
                                                <Flex justify={'between'}>
                                                    {this.state.giftstate === 0 ? (
                                                        <Flex style={{marginTop: 10, height: 40, marginLeft: 10}}>
                                                            <Flex align={'center'} style={{width: 100, height: 20}}>
                                                                <RadioItem
                                                                    disabled={true}
                                                                    checked={item.index === index}
                                                                    //disabled={item.Stock === 0}
                                                                    onChange={(event) => {
                                                                        if (event.target.checked) {
                                                                            let list = this.state.list;
                                                                            list[index].select = !list[index].select;
                                                                            list[index].radioid = list[index].select == true ? false : true;
                                                                            this.setState({
                                                                                list,
                                                                            });
                                                                        }
                                                                    }}>
                                                                    {item.select === true ? (
                                                                        <Image
                                                                            style={{width: 20, height: 20, marginTop: 5}}
                                                                            source={require('~/assets/public/select.png')}
                                                                        />
                                                                    ) : (
                                                                        <Image
                                                                            style={{width: 20, height: 20, marginTop: 5}}
                                                                            source={require('~/assets/public/noselect2.png')}
                                                                        />
                                                                    )}
                                                                </RadioItem>
                                                                <Text style={{color: '#666666', paddingLeft: 20, paddingRight: 10}}>兑换</Text>
                                                            </Flex>
                                                            {/*<Flex>*/}
                                                            {/*    <RadioItem*/}
                                                            {/*        checked={item.index === index}*/}
                                                            {/*        disabled={item.Stock === 0}*/}
                                                            {/*        onChange={(event) => {*/}
                                                            {/*            if (event.target.checked) {*/}
                                                            {/*                let list = this.state.list;*/}
                                                            {/*                list[index].radioid = !list[index].radioid;*/}
                                                            {/*                list[index].select = list[index].radioid == true ? false : true;*/}
                                                            {/*                this.setState({*/}
                                                            {/*                    list,*/}
                                                            {/*                });*/}
                                                            {/*            }*/}
                                                            {/*        }}>*/}
                                                            {/*        {item.radioid === true ? (*/}
                                                            {/*            <Image*/}
                                                            {/*                style={{width: 20, height: 20, marginTop: 5}}*/}
                                                            {/*                source={require('~/assets/public/select.png')}*/}
                                                            {/*            />*/}
                                                            {/*        ) : (*/}
                                                            {/*            <Image*/}
                                                            {/*                style={{width: 20, height: 20, marginTop: 5}}*/}
                                                            {/*                source={require('~/assets/public/noselect2.png')}*/}
                                                            {/*            />*/}
                                                            {/*        )}*/}
                                                            {/*    </RadioItem>*/}
                                                            {/*    <Text style={{color: '#666666', paddingLeft: 20, paddingRight: 10}}>换卡</Text>*/}
                                                            {/*</Flex>*/}
                                                        </Flex>
                                                    ) : (
                                                        <Flex
                                                            onPress={() => {
                                                                item.OrderExpressID === 2
                                                                    ? this.props.navigation.push('GiftMoreList', {
                                                                          productParamID: item.ProductParamID,
                                                                      })
                                                                    : this.props.navigation.push('PackageOrderInfo', {
                                                                          takeOrderDataId: this.state.takeOrderDataId,
                                                                          giftType: this.state.giftType, //1引流礼品  2车位礼品
                                                                      });
                                                            }}
                                                            style={{width: '70%', height: 40}}>
                                                            <Text style={{paddingLeft: 10, paddingTop: 10, color: '#E67818'}}>
                                                                {item.OrderExpressID === 1 && '已兑换'}
                                                                {item.OrderExpressID === 2 && '已换卡'}
                                                            </Text>
                                                        </Flex>
                                                    )}
                                                    {this.state.giftstate === 1 && (
                                                        <Flex
                                                            onPress={() => {
                                                                this.props.navigation.push('PackageOrderInfo', {
                                                                    takeOrderDataId: this.state.takeOrderDataId,
                                                                    giftType: this.state.giftType, //1引流礼品  2车位礼品
                                                                });
                                                            }}>
                                                            {item.OrderExpressID === 1 && <Text style={styles.textbuttom5}>查看订单详情</Text>}
                                                        </Flex>
                                                    )}
                                                    {/*{this.state.giftstate === 0 ? (*/}
                                                    {/*    <Flex*/}
                                                    {/*        onPress={() => {*/}
                                                    {/*            this.props.navigation.push('GiftMoreList', {*/}
                                                    {/*                productParamID: item.ProductParamID,*/}
                                                    {/*            });*/}
                                                    {/*        }}>*/}
                                                    {/*        <Text style={styles.textbuttom5}>查看兑换商品</Text>*/}
                                                    {/*    </Flex>*/}
                                                    {/*) : (*/}
                                                    {/*    <Flex*/}
                                                    {/*        onPress={() => {*/}
                                                    {/*            item.OrderExpressID === 2*/}
                                                    {/*                ? this.props.navigation.push('GiftMoreList', {*/}
                                                    {/*                      productParamID: item.ProductParamID,*/}
                                                    {/*                  })*/}
                                                    {/*                : this.props.navigation.push('PackageOrderInfo', {*/}
                                                    {/*                      takeOrderDataId: this.state.takeOrderDataId,*/}
                                                    {/*                      giftType: this.state.giftType, //1引流礼品  2车位礼品*/}
                                                    {/*                  });*/}
                                                    {/*        }}>*/}
                                                    {/*        <Text style={styles.textbuttom5}>*/}
                                                    {/*            {item.OrderExpressID === 1 && '查看订单详情'}*/}
                                                    {/*            {item.OrderExpressID === 2 && '查看兑换商品'}*/}
                                                    {/*        </Text>*/}
                                                    {/*    </Flex>*/}
                                                    {/*)}*/}
                                                </Flex>
                                            </View>
                                        )}
                                    </View>
                                );
                            })
                        )}
                    </View>
                </ScrollView>
                <Flex style={{width: '100%', height: 50}} align={'end'}>
                    {this.state.giftstate === 0 ? (
                        <Flex
                            onPress={() => {
                                this.onpress();
                            }}
                            style={{width: '100%', height: 50, backgroundColor: 'white', paddingTop: 8, paddingRight: 10}}
                            justify={'end'}
                            align={'start'}>
                            <ImageBackground style={{width: 94, height: 35}} source={require('~/assets/li/queding.png')}>
                                <Text style={{color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center', paddingTop: 10}}>确认领取</Text>
                            </ImageBackground>
                        </Flex>
                    ) : (
                        <Flex
                            onPress={() => {
                                this.props.navigation.replace('PackageOrderInfo', {
                                    takeOrderDataId: this.state.takeOrderDataId,
                                    giftType: this.state.giftType, //1引流礼品  2车位礼品
                                });
                            }}
                            style={{width: '100%', height: 50, backgroundColor: 'white', paddingTop: 8, paddingRight: 10}}
                            justify={'end'}
                            align={'start'}>
                            <ImageBackground style={{width: 94, height: 35}} source={require('~/assets/li/queding.png')}>
                                <Text style={{color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center', paddingTop: 10}}>查看详情</Text>
                            </ImageBackground>
                        </Flex>
                    )}
                </Flex>
            </View>
        );
    }
}
const styles = StyleSheet.create({
    textbuttom5: {
        fontSize: 14,
        width: 90,
        height: 30,
        borderWidth: 1,
        borderColor: '#666666',
        borderRadius: 15,
        color: '#666666',
        textAlign: 'center',
        paddingTop: 5,
        marginLeft: 5,
        marginTop: 10,
        marginRight: 10,
    },
});
